package com.tunan.config;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.tunan.lsj.interceptor.TokenSecurityInterceptor;

public class WebAppConfig extends WebMvcConfigurerAdapter {
	@Bean
	public TokenSecurityInterceptor createTokenSecurityInterceptor() {
		return new TokenSecurityInterceptor();
	}

	/**
	 * 配置拦截器
	 * 
	 * @author lance
	 * @param registry
	 */
	public void addInterceptors(InterceptorRegistry registry) {
		//registry.addInterceptor(createTokenSecurityInterceptor()).addPathPatterns("/ajax/**");
	}

}
